//数据库创建集合
var mongoose = require('mongoose');
var db = require('./db.js');
var Schema = mongoose.Schema;
var packInfo = require("./packInfo.js")

var col = {}
for (let i in packInfo.collection) {
	col[i] = new Schema(packInfo.collection[i])
}

for (let i in col) {
	module.exports = db.model(`${i}`, col[i])
}
